home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!lorelei.demon.co.uk
- From: John Croudy <john@lorelei.demon.co.uk>
- Newsgroups: comp.lang.c++
- Subject: Re: leave a file open without fclose it.
- Date: Sun, 7 Apr 96 17:40:28 GMT
- Organization: home
- Message-ID: <9604071740.AA001nm@lorelei.demon.co.uk>
- References: <4k7ejd$ld8@news.cc.utah.edu>
- X-NNTP-Posting-Host: lorelei.demon.co.uk
- X-Newsreader: TIN [AMIGA 1.3 950726BETA PL0]
- X-Mail2News-Path: relay-4.mail.demon.net!post.demon.co.uk!lorelei.demon.co.uk
-
- On 7 Apr 1996 03:59:41 GMT, Steven Huang wrote:
-
- > What will happen if i leave a file open without fclose it?
-
- The file will stay opened of course! But seriously, if it's open for
- reading it doesn't seem to do much harm... if opened for writing then
- the final buffer-full probably doesn't get written until you close it.
- And it depends what system you're runing on. Some operating systems
- like VAX/VMS close files on program exit, some like MS-DOS don't seem
- to.
-
- The best thing to do is close it. And then you don't have to worry
- about it.
-
- John
- xxxx
-